package websocket

import "encoding/json"

func (c *Connect) GetMessageType(data []byte) (string, error) {
	var temp = &Data{}
	err := json.Unmarshal(data, temp)
	if err != nil {
		return "", err
	}
	return temp.Type, nil
}
